package de.wittekind.bundesjugendspiele.dummy;

import java.io.IOException;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.GregorianCalendar;
import java.util.List;

import de.wittekind.bundesjugendspiele.server.interfaces.Discipline;
import de.wittekind.bundesjugendspiele.server.interfaces.Schueler;
import de.wittekind.bundesjugendspiele.server.interfaces.Try;

public class DummySchueler extends UnicastRemoteObject implements Schueler {

	String firstname, lastname;
	Gender g;
	GregorianCalendar bday;
	int riege;
	int id;
	private List<Try> tries;
	
	public DummySchueler(int id) throws IOException
	{
		this.id=id;
		tries = new ArrayList<Try>();
	}
	
	@Override
	public int getID() throws IOException {
		return id;
	}
	

	@Override
	public String getLastName() throws IOException {
		return lastname;
	}

	@Override
	public String getFirstName() throws IOException {
		return firstname;
	}

	@Override
	public GregorianCalendar getBirthday() throws IOException {
		return bday;
	}

	@Override
	public int getPoints() throws IOException {
		return 9000;
	}

	@Override
	public int getTry() throws IOException {
		return 0;
	}

	@Override
	public int getCurrentDiscipline() throws IOException {
		return 0;
	}

	@Override
	public Gender getGender() {
		return g;
	}

	@Override
	public void setTry(int nTry) throws IOException {
		// TODO Auto-generated method stub

	}


	@Override
	public void setFirstName(String nFirstName) throws IOException {
		firstname = nFirstName;
	}

	@Override
	public void setBirthday(GregorianCalendar nDate) throws IOException {
		bday = nDate;
	}

	@Override
	public void setGender(Gender nGender) throws IOException {
		g = nGender;
	}


	@Override
	public void setDiscipline(int id, Discipline d) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setLastName(String nLastName) throws IOException {
		lastname = nLastName;
	}

	@Override
	public Try[] getTries() throws IOException {
		return tries.toArray(new Try[]{});
	}
	
	@Override
	public Try createNewTry() throws IOException {
		Try t = new DummyTry();
		tries.add(t);
		return t;
	}

	@Override
	public void setTries(Try[] mTries) throws IOException {
		tries = Arrays.asList(mTries);
	}

	@Override
	public String getForm() throws IOException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setForm(String nClass) throws IOException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public int getNote() throws IOException {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public boolean hasEhrenurkunde() throws IOException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public boolean hasSiegerurkunde() throws IOException {
		// TODO Auto-generated method stub
		return false;
	}

}
